#include <stdio.h>

/* 从(0, 0)到(m, n)，共需右走m次，上走n次，
故走法总数为组合数(m+n, m)，即result = (m+n)!/m!/n!
走到终点的总数减去经过禁止点的总数即可得到答案
*/

long long getFactorial(long long target) {
    long long result = 1;
    while (target > 1) {
        result *= target; target--;
    }
    return result;
}

long long pointBX = 1, pointBY = 1, pointPX = 1, pointPY = 1;

// 尤其注意！起始点坐标为(1, 1)而非(0, 0)，出的什么破题，这都不说清楚
long long getPathCnt() {
    long long result = 0;
    result += getFactorial(pointBY + pointBX - 2) / getFactorial(pointBY - 1) / getFactorial(pointBX - 1);
    if (pointPY <= pointBY && pointPX <= pointBX) {
        result -= getFactorial(pointPY + pointPX - 2) / getFactorial(pointPY - 1) / getFactorial(pointPX - 1) *
        getFactorial(pointBY - pointPY + pointBX - pointPX) / getFactorial(pointBY - pointPY) / getFactorial(pointBX - pointPX);
    }
    return result;
}

int main() {
    while (pointBX > 0 && pointBY > 0 && pointPX > 0 && pointPY > 0) {
        scanf("%lld%lld%lld%lld", &pointBX, &pointBY, &pointPX, &pointPY);
        if (pointBX > 0 && pointBY > 0 && pointPX > 0 && pointPY > 0) {
            printf("%lld\n", getPathCnt());
        }
    }
    return 0;
}